<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="com.entity.Document" %>
<!DOCTYPE HTML>
<html >
<head>
	<meta charset="UTF-8">
	<title>凯胜项目管理系统</title>
	<link rel="stylesheet" href="static/css/bootstrap.min.css" />
	<link rel="stylesheet" href="static/css/daohang.css" type="text/css" />
	<link rel="stylesheet" href="static/css/style.css" type="text/css" />
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>

	
	
	<style type="text/css">
		.icon-while{
			background-image: url("static/img/glyphicons-halflings-white.png");
		}
		
		body{
			background-image:url("static/img/bg_main.jpg");
		}
		#divv{
			width:600px;
			height:30px;
			overflow:hidden;
			transition:height 2s;
			-moz-transition:height 2s; /* Firefox 4 */
			-webkit-transition:height 2s; /* Safari and Chrome */
			-o-transition:height 2s; /* Opera */
		}
		#divv:hover{
			height:130px;
		}
	</style>
</head>
<body>
	<%@ include file="include/top2.jsp" %>
	<jsp:include page="include/top.jsp">
		<jsp:param value="document" name="tag"/>
	</jsp:include>
	<div class="container">
		<div class="row">
			<%-- <jsp:include page="include/side.jsp">
				<jsp:param value="document" name="tag"/>
			</jsp:include> --%>
			<div class="span9">
				<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
					<li class="active">
						<a href="#"><i class="icon-folder-open"></i>资料</a>
					</li>
					<li class="pull-right"><i class="icon-plus"></i><a href="document.jspx?m=share" class="link-black">分享新资料</a></li>
				</ul>
				<br>
				<div class="wall" style="margin-bottom:20px;">
					<c:forEach items="${page.result}" var="p">
					<blockquote>
						<h4><a href="document.jspx?m=show&id=${p.id }">${p.docname }</a></h4><br>
						<p style="font-size:16px;line-height:1.5;margin-left:10px;">${p.docmessage }</p>
						<small style="color:#0088cc;">${p.user.userName }发布于${p.time}</small>
						<c:choose>
							<c:when test="${p.user.id eq up.userid}">
								<a href="document.jspx?m=edit&id=${p.id }" title="修改"><i class="icon-pencil"></i></a>
								<a href="document.jspx?m=del&id=${p.id }" title="删除"><i class="icon-trash"></i></a>
							</c:when>
							<c:when test="${up.role eq 'manager'}">
								<a href="document.jspx?m=edit&id=${p.id }" title="修改"><i class="icon-pencil"></i></a>
								<a href="document.jspx?m=del&id=${p.id }" title="删除"><i class="icon-trash"></i></a>
							</c:when>
							<c:otherwise>
								
							</c:otherwise>
						</c:choose>
							<br>
							<div id="divv" >
								<form action="document.jspx?m=say&id=${p.id}" method="post">
									<textarea class="span6" name="docmessage" rows="4" placeholder="请对项目进行简单的描述" ></textarea>
									<br>
									<input type="submit" value="评论" style="width:60px;border-radius:10px 0px 10px 0px;margin-left:380px;color:#0088cc"/>
								</form>
							</div>
							<br>
					</blockquote>
					</c:forEach>
					<div class="pagination pull-right">
					
				  		<%-- 共${page.totalPages }页当前第${page.pageNum }页 --%>
				  		<ul>
				  		<li>
						  	<c:choose>
					  		<c:when test="${page.pageNum == 1 }">
					  			<a href="#">首页</a>
					  		</c:when>
					  		<c:otherwise>
							  	<a href="document.jspx?p=1">首页</a>
					  		</c:otherwise>
					  	</c:choose>
					  	</li>
					  	<li>
					  	<c:choose>
					  		<c:when test="${page.pageNum == 1 }">
					  			<a>上一页</a>
					  		</c:when>
					  		<c:otherwise>
							  	<a href="document.jspx?p=${page.pageNum - 1 }">上一页</a>
					  		</c:otherwise>
					  	</c:choose>
					  	</li>
					  	<li>
					  	<c:choose>
					  		<c:when test="${page.pageNum == page.totalPages }">
					  			<a href="#">下一页</a>
					  		</c:when>
					  		<c:otherwise>
							  	<a href="document.jspx?p=${page.pageNum + 1 }">下一页</a>
					  		</c:otherwise>
					  	</c:choose>
					  	</li>
					  	<li>
					  	<c:choose>
					  		<c:when test="${page.pageNum == page.totalPages }">
					  			<a href="#">尾页</a>
					  		</c:when>
					  		<c:otherwise>
							  	<a href="document.jspx?p=${page.totalPages}">尾页</a>
					  		</c:otherwise>
					  	</c:choose>
					  	</li>
					  	</ul>
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div class="span3">
			
			</div>
		
		</div>
		
	</div>
	
	<script type="text/javascript" src="static/js/jquery.js"></script>
	<script type="text/javascript" src="static/js/jqueryui.js"></script>
	<script type="text/javascript" src="static/js/jquery.illuminate.0.7.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
				
			$('#button').illuminate({
				'intensity': '0.5',
				'color': '#2c2c2c'
			});
			
			$("#btn").click(function(){
				var mm=document.getElementsByTagName("in").value;
				var m=document.getElementById("mm");
				if(m.style.display=="none"){
					m.style.display="block";
					ob.style.display="none";
				}else{
					m.style.display="none";
					ob.style.display="block";
				}
				
			});
		});
	
		/* function change(){
				var m=document.getElementsByTagName("in");
				var o=document.getElementById("in").value;
				alert(o);
				var ss= "btn"+o;
				var s="button"+o;
				var obj=document.getElementById('btn'+o);
				var ob=document.getElementById('button'+o);
				if(obj.style.display=="none"){
					obj.style.display="block";
					ob.style.display="none";
				}else{
					obj.style.display="none";
					ob.style.display="block";
				}
				var o=null;
			  }; */
		
		$(document).ready( function(){});
		$("#btn").click(function(){
		
		});
			 function hiden(){
				$("#div2").hide();//hide()函数,实现隐藏,括号里还可以带一个时间参数(毫秒)例如hide(2000)以2000毫秒的速度隐藏,还可以带slow,fast
			 }
			 function slideToggle(){
				$("#div2${p.id}").slideToggle(2000);//窗帘效果的切换,点一下收,点一下开,参数可以无,参数说明同上
			 }
			function show(){
				$("#div2").show();//显示,参数说明同上
			}
			function toggle(){
				$("#div2${p.id}").toggle(2000);//显示隐藏切换,参数可以无,参数说明同上
			
			}
			function slide(){
				$("#div2${p.id}").slideDown();//窗帘效果展开
			};
	
	</script>
</body>
</html>